package com.lengxf.design;

public class Director extends Approver {
    public Director(String name) {
        super(name);
    }

    public void processRequest(PurchaseRequest request) {
        if (request.getAmount() < 50000) {
            System.out.println("主任处理了此订单" + request);
        } else {
            this.successor.processRequest(request);
        }
    }

}
